<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" import="kaiin.KaiinBeans, shouhin.ShouhinBeans"%>
<jsp:useBean id="cart" class="kessai.CartBeans" scope="session" />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="content-type" content="text/css" />
<link rel="stylesheet" href="../src/jsp/css/base.css" type="text/css" media="all" />
<link rel="stylesheet" href="../src/jsp/css/cart.css" type="text/css" media="all" />

<title>注文の確定</title>
</head>

<body>
<%KaiinBeans kaiin = (KaiinBeans)session.getAttribute("kaiin");
if(kaiin == null) kaiin = new KaiinBeans();
%>
<div id="wrapper">

<div id="header">
	<h1><a href="../top"><img src="http://localhost:8080/tsuhan/src/img/kyoutu/head4.jpg" width="765px" height="110" alt="うるまかりゆし商店"/></a></h1>
	<ul>
		<li id="top"><a href="../top">トップページ</a></li>
		<li id="foods"><a href="./foods.html">食品</a></li>
		<li id="craft"><a href="./craft.html">民芸品</a></li>
		<li id="book_cd"><a href="./book_cd.html">本・CD</a></li>
		<li id="info"><span>カートの中身</span></li>
		<li id="faq"><a href="#">お問い合わせ</a></li>
	</ul>
</div><!-- header_END -->

<div id="pagebody">

<div id="sidebar">
<%if(!kaiin.isLogIn()){ %>
	<h2>ログイン</h2>
<div id="login">
	<form action = "kaiin/login">
	<label class="sidelabel" for="identify"">お客様番号</label>
	<input type="text" id="identify" name="identify"></input>
	<label class="sidelabel" for="pass">パスワード</label>
	<input type="text" id="pass" name="pass"></input>
	<input type="submit" id="loginsub" value="送信" />
	</form>
	<a href="reg">新規登録</a>
</div><!-- login_END -->
<%}else{ %>
<div id="login_mem">
	<%=kaiin.getSimei() %>さん！ようこそ！
	<br />
	<a href="kaiin/logout">ログアウト</a>
</div>
<%} %>

<div class="ad">
 <img src="" alt="広告スペース1" />

</div>

<div class="ad">
 <img src="" alt="広告スペース2" />
</div>

</div><!-- sidebar_END -->
<div id="content">
	<h2>ご注文内容の確認</h2>

	<form action="/tsuhan/kessai/buySend" method="post">
		<table id="products">
		<tr>
			<th>商品</th><th class="num">数量</th><th class="num">単価</th><th class="num">小計</th><th></th>
		</tr>

<!-- ■商品ごとのタグ<tr>～</tr>■ -->
<%
	for(int i=0; i<cart.getItems().size(); i++){
		ShouhinBeans item = cart.getItems().get(i);
%>
		<tr>
			<td><em><%=item.getSyouhinmei() %></em></td>
			<td class="num"><%=item.getKosuu() %></td>
			<td class="num"><%=item.getNedan() %></td>
			<td class="num"><%=item.getSyoukei() %></td>
			<td class="del"><input type="button" class="button" value="削除" /></td>
		</tr>
<%
	}
%>
<!-- ■商品ごとのタグ<tr>～</tr>■ -->

				<tr>
			<td class="hidden" colspan="2"></td>
			<th class="num">小計</th>
			<td class="num"><%=cart.getSyoukei() %></td>
		</tr>

		<tr>
			<td class="hidden" colspan="2"></td>
			<th class="num">消費税</th>
			<td class="num"><%=cart.getSyouhizei() %></td>
		</tr>

		<tr>
			<td class="hidden" colspan="2"></td>
			<th class="num total">合計</th>
			<td class="num total"><%= cart.getSougoukei() %></td>
		</tr>
		</table>

		<table id="pay_shipto">
			<caption>■支払い方法・お届け先</caption>
			<tr>
				<th>お支払い方法</th><td><%=request.getAttribute("siharai") %></td>
			</tr>

			<tr>
				<th>お名前</th><td><%=kaiin.getSimei() %></td>
			</tr>
			<tr>
				<th>フリガナ</th><td><%=kaiin.getHurigana() %></td>
			</tr>
			<tr>
				<th>郵便番号</th><td><%=kaiin.getYuubin() %></td>
			</tr>
			<tr>
				<th>住所</th><td><%=kaiin.getJuusyo() %></td>
			</tr>
			<tr>
				<th>電話番号</th><td><%=kaiin.getTel() %></td>
			</tr>
		</table>

		<div class="edit">
			<p>前ページへ戻って修正する
			<input type="button" class="button" value="修正・変更" />
			</p>
		</div>

		<div class="submit">
			<p>上記の内容で宜しければ、ボタンをクリックしてください
			<input type="submit" value="注文する" />
			</p>
		</div>
	</form>



</div><!-- content_END -->
</div><!-- pagebody_END -->

<div id="footer">
	<ul>
		<li id="privacy"><a href="#" title="プライバシーポリシー">privacy</a></li>
		<li id="sitemap"><a href="#" title="サイトマップ">sitemap</a></li>
		<li id="info"><a href="#" title="お問い合わせ">info</a></li>
	</ul>

	<p>All rights reserved Nak Corporation &amp; Co.2010-2011</p>

</div><!-- footer_END -->

</div><!-- wrapper_END -->

</body>
</html>
